home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Freeware / Miro 1.0 / Miro_Installer.exe / xulrunner / python / compiled_templates / channelfoldertab.py < prev    next >
Encoding:
Python Source  |  2007-11-12  |  3.9 KB  |  80 lines

  1. # This is a generated file. Do not edit.
  2. from template import Handle, fillAttr, quoteAndFillAttr, fillStaticTemplate
  3. from StringIO import StringIO
  4. from xhtmltools import urlencode
  5. from templatehelper import quoteattr, escape
  6. from string import Template
  7. import app
  8. import views
  9. import sorts
  10. import indexes
  11. import filters
  12. import resources
  13. import gtcache
  14. _ = gtcache.gettext
  15. def fillTemplate(domHandler, dtvPlatform, eventCookie, bodyTagExtra, *args, **kargs):
  16.     # Start of handle
  17.  
  18.     # Start user code
  19.     # End user code
  20.  
  21.     localvars = locals()
  22.     localvars.update(globals())
  23.     handle = Handle(domHandler, localvars, onUnlink = lambda:None)
  24.  
  25.  
  26.  
  27.     out = StringIO()
  28.     out.write(u"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n")
  29.     out.write(u'<html xmlns:t="http://www.participatorypolitics.org/" xmlns:i18n="http://www.participatoryculture.org/i18n">\n<head>\n</head>\n<body')
  30.     out.write(u" " + bodyTagExtra)
  31.     out.write(u'>\n\n<div dragdestdata="channelfolder-')
  32.     out.write(quoteattr(this.objID()))
  33.     out.write(u'" dragdesttype="channelfolder" class="tab-drop-target" drageffectchannelfolder="move">\n<div class="dnd-reorder-indicator circle"></div>\n<div class="dnd-reorder-indicator line"></div>\n<div dragdestdata="channelfolder-')
  34.     out.write(quoteattr(this.objID()))
  35.     out.write(u'" dragdesttype="channel" drageffectchannel="move" class="tab-container-drop-target">\n<div class="dnd-container-drop-indicator left"></div>\n<div class="dnd-container-drop-indicator mid"></div>\n<div class="dnd-container-drop-indicator right"></div>\n<a dragsourcetype="channelfolder" dragicon="channel-tnail-')
  36.     out.write(quoteattr(this.objID()))
  37.     out.write(u'" class="feeditem noselect draggable folder" dragsourcedata="tablist-')
  38.     out.write(quoteattr(this.objID()))
  39.     out.write(u'">\n')
  40.     if not (this.obj.getExpanded()):
  41.         out.write(u'<img src="')
  42.         out.write(quoteattr(resources.url(u'images/tab-arrow-up.png')))
  43.         out.write(u'" alt="expanded" onmousedown="return eventURL(\'action:toggleExpand?id=\' + ')
  44.         out.write(quoteattr(this.objID()))
  45.         out.write(u');" class="expanded-triangle"></img>')
  46.     out.write(u'\n')
  47.     if not (not (this.obj.getExpanded())):
  48.         out.write(u'<img src="')
  49.         out.write(quoteattr(resources.url(u'images/tab-arrow-down.png')))
  50.         out.write(u'" alt="unexpanded" class="expanded-triangle" onmousedown="return eventURL(\'action:toggleExpand?id=\' + ')
  51.         out.write(quoteattr(this.objID()))
  52.         out.write(u');"></img>')
  53.     out.write(u'\n')
  54.     if not (not (this.obj.showA())):
  55.         out.write(u'<div class="left-bubble blue ')
  56.         out.write(quoteattr(this.obj.showU() and 'second' or ''))
  57.         out.write(u'">\n <div class="right-bubble blue">\n  <div class="number-count blue">')
  58.         out.write(escape(this.obj.numAvailable()))
  59.         out.write(u'</div>\n </div>\n</div>')
  60.     out.write(u'\n')
  61.     if not (not (this.obj.showU())):
  62.         out.write(u'<div class="left-bubble green">\n <div class="right-bubble green">\n  <div class="number-count green">')
  63.         out.write(escape(this.obj.numUnwatched()))
  64.         out.write(u'</div>\n </div>\n <div href="#" class="new-video-play-button" onclick="return playNewVideos(event, ')
  65.         out.write(quoteattr(this.objID()))
  66.         out.write(u');">\n     <img src="')
  67.         out.write(quoteattr(resources.url(u'images/play.png')))
  68.         out.write(u'"></img>\n </div>\n</div>')
  69.     out.write(u'\n<img src="')
  70.     out.write(quoteattr(resources.url(u'images/folder-icon-tablist.png')))
  71.     out.write(u'" id="channel-tnail-')
  72.     out.write(quoteattr(this.objID()))
  73.     out.write(u'" class="icon"></img><div class="name">')
  74.     out.write(escape(this.obj.getTitle()))
  75.     out.write(u'</div>\n</a>\n</div>\n</div>\n</body>\n</html>')
  76.     out.seek(0)
  77.  
  78.  
  79.     return (out, handle)
  80.